﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Account.Master" AutoEventWireup="true"
    CodeBehind="EducationWork.aspx.cs" Inherits="FrenzDenWebSite.EducationWorkForm" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="panelContent" runat="server">
    <fieldset class="ui-corner-all" style="background-color: White; border: 1px slid black;
        padding: 10px;">
        <asp:UpdatePanel ID="pnlUpdate" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div id="msgboxpanel" runat="server">
                </div>
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 120px; vertical-align: top;">
                            <span class="labelcls">Employer:</span>
                        </td>
                        <td style="width: 320px">
                            <asp:UpdatePanel ID="pnlUpdateEmployer" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:Panel ID="pnlAddWorkspace" runat="server">
                                        <fieldset class="ui-corner-all" style="background-color: White; border: 1px slid black;
                                            padding: 10px; width: 300px; height: 170px; float: left; font-size: 11px;">
                                            <label style="font-size: 12px; font-weight: bold;">
                                                Add Employer</label>
                                            <hr />
                                            <table>
                                                <tr>
                                                    <td>
                                                        <span>* Company Name:</span>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <span>* City:</span>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtCompanyCity" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <span>Start Date:</span>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlStartMonth" runat="server">
                                                            <asp:ListItem></asp:ListItem>
                                                            <asp:ListItem Value="1">Jan</asp:ListItem>
                                                            <asp:ListItem Value="2">Feb</asp:ListItem>
                                                            <asp:ListItem Value="3">Mar</asp:ListItem>
                                                            <asp:ListItem Value="4">Apr</asp:ListItem>
                                                            <asp:ListItem Value="5">May</asp:ListItem>
                                                            <asp:ListItem Value="6">Jun</asp:ListItem>
                                                            <asp:ListItem Value="7">Jul</asp:ListItem>
                                                            <asp:ListItem Value="8">Aug</asp:ListItem>
                                                            <asp:ListItem Value="9">Sept</asp:ListItem>
                                                            <asp:ListItem Value="10">Oct</asp:ListItem>
                                                            <asp:ListItem Value="11">Nov</asp:ListItem>
                                                            <asp:ListItem Value="12">Dec</asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:DropDownList ID="ddlStartYear" runat="server">
                                                            <asp:ListItem></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <span>End Date:</span>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlEndMonth" runat="server">
                                                            <asp:ListItem></asp:ListItem>
                                                            <asp:ListItem Value="1">Jan</asp:ListItem>
                                                            <asp:ListItem Value="2">Feb</asp:ListItem>
                                                            <asp:ListItem Value="3">Mar</asp:ListItem>
                                                            <asp:ListItem Value="4">Apr</asp:ListItem>
                                                            <asp:ListItem Value="5">May</asp:ListItem>
                                                            <asp:ListItem Value="6">Jun</asp:ListItem>
                                                            <asp:ListItem Value="7">Jul</asp:ListItem>
                                                            <asp:ListItem Value="8">Aug</asp:ListItem>
                                                            <asp:ListItem Value="9">Sept</asp:ListItem>
                                                            <asp:ListItem Value="10">Oct</asp:ListItem>
                                                            <asp:ListItem Value="11">Nov</asp:ListItem>
                                                            <asp:ListItem Value="12">Dec</asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:DropDownList ID="ddlEndYear" runat="server">
                                                            <asp:ListItem></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            <asp:Button ID="btnCancelEmployer" runat="server" Text="Cancel" CssClass="msg_button_class"
                                                Style="float: right;" />
                                            <asp:Button ID="btnAddEmployer" ValidationGroup="company" runat="server" Text="Save"
                                                CssClass="msg_button_class" Style="float: right;" OnClick="btnAddEmployer_Click" />
                                            <asp:RequiredFieldValidator ValidationGroup="company" ID="rfvCompanyName" runat="server"
                                                ErrorMessage="Required" ControlToValidate="txtCompanyName" Display="None"></asp:RequiredFieldValidator>
                                            <asp:ValidatorCalloutExtender ID="rfvCompanyName_ValidatorCalloutExtender" runat="server"
                                                Enabled="True" TargetControlID="rfvCompanyName">
                                            </asp:ValidatorCalloutExtender>
                                            <asp:RequiredFieldValidator ValidationGroup="company" ID="rfvCompanyCity" runat="server"
                                                ErrorMessage="Required" ControlToValidate="txtCompanyCity" Display="None"></asp:RequiredFieldValidator>
                                            <asp:ValidatorCalloutExtender ID="rfvCompanyCity_ValidatorCalloutExtender" runat="server"
                                                Enabled="True" TargetControlID="rfvCompanyCity">
                                            </asp:ValidatorCalloutExtender>
                                        </fieldset>
                                    </asp:Panel>
                                    <asp:DataList ID="GridEmployers" runat="server">
                                        <ItemTemplate>
                                            <div style="width: 300px">
                                                <span style="font-weight: bold; font-size: 13px;">
                                                    <%# DataBinder.Eval(Container.DataItem, "EmployerName")%>,
                                                    <%# DataBinder.Eval(Container.DataItem, "City")%></span>
                                                <br />
                                                <span style="font-size: 11px;">
                                                    <%# DataBinder.Eval(Container.DataItem, "StartDate", "{0:MMM yyyy}")%>
                                                    -
                                                    <%#DataBinder.Eval(Container.DataItem, "EndDate").ToString() == DateTime.MinValue.ToString()? "Current" : DataBinder.Eval(Container.DataItem, "EndDate", "{0:MMM yyyy}")%>
                                                </span>
                                                <asp:ImageButton ID="imgDeleteEmployer" Style="float: right;" pid='<%# DataBinder.Eval(Container.DataItem, "ProfileEmpID")%>'
                                                    ImageUrl="~/images/Close-icon.png" runat="server" OnClick="imgDeleteEmployer_Click"
                                                    OnClientClick="return confirm('Are you sure?')" />
                                                <hr />
                                            </div>
                                        </ItemTemplate>
                                    </asp:DataList>
                                    <asp:ModalPopupExtender ID="modalAddEmployer" runat="server" BackgroundCssClass="modalPopup"
                                        TargetControlID="lnkAddWorkplace" PopupControlID="pnlAddWorkspace" />
                                    <asp:LinkButton ID="lnkAddWorkplace" runat="server">Add Employer</asp:LinkButton>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="btnAddEmployer" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>
                            <asp:UpdateProgress ID="updateEmployerProgress" runat="server" AssociatedUpdatePanelID="pnlUpdateEmployer">
                                <ProgressTemplate>
                                    <div style="position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; background-color: #000000;
                                        filter: alpha(opacity=55); -moz-opacity: .55; opacity: .55; z-index: 50;" id="pagedimmer">
                                        &nbsp;</div>
                                    <div style="position: fixed; background-color: #888888; border: 1px solid #999999;
                                        z-index: 50; left: 50%; right: 50%; top: 50%; width: 25px;" id="msgbox">
                                        <div>
                                            <img src="ajax-loader.gif" alt="loading" />
                                        </div>
                                    </div>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                        <td style="width: 120px">
                            <asp:DropDownList ID="ddlEmployerPrivacy" CssClass="ddlcls ui-widget-content ui-corner-all"
                                runat="server">
                                <asp:ListItem Value="1">Public</asp:ListItem>
                                <asp:ListItem Value="2">Friends</asp:ListItem>
                                <asp:ListItem Value="3">Private</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px">
                            &nbsp;
                        </td>
                        <td style="width: 320px">
                            &nbsp;
                        </td>
                        <td style="width: 120px">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px; vertical-align: top;">
                            <span class="labelcls">College/Institution:</span>
                        </td>
                        <td style="width: 320px">
                            <asp:UpdatePanel ID="pnlUpdateCollege" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:Panel ID="pnlAddCollege" runat="server">
                                        <fieldset class="ui-corner-all" style="background-color: White; border: 1px slid black;
                                            padding: 10px; width: 300px; height: 170px; float: left; font-size: 11px;">
                                            <label style="font-size: 12px; font-weight: bold;">
                                                Add College/Institution</label>
                                            <hr />
                                            <table>
                                                <tr>
                                                    <td>
                                                        <span>* Institution Name:</span>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtCollegeName" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <span>* City:</span>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtCollegeCity" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            <asp:Button ID="btnCancelCollege" runat="server" Text="Cancel" CssClass="msg_button_class"
                                                Style="float: right;" />
                                            <asp:Button ID="btnAddCollege" ValidationGroup="college" runat="server" Text="Save"
                                                CssClass="msg_button_class" Style="float: right;" OnClick="btnAddCollege_Click" />
                                            <asp:RequiredFieldValidator ValidationGroup="college" ID="rfvCollegeName" runat="server"
                                                ErrorMessage="Required" ControlToValidate="txtCollegeName" Display="None"></asp:RequiredFieldValidator>
                                            <asp:ValidatorCalloutExtender ID="rfvCollegeName_ValidatorCalloutExtender" runat="server"
                                                Enabled="True" TargetControlID="rfvCollegeName">
                                            </asp:ValidatorCalloutExtender>
                                            <asp:RequiredFieldValidator ValidationGroup="college" ID="rfvCollegeCity" runat="server"
                                                ErrorMessage="Required" ControlToValidate="txtCollegeCity" Display="None"></asp:RequiredFieldValidator>
                                            <asp:ValidatorCalloutExtender ID="rfvCollegeCity_ValidatorCalloutExtender" runat="server"
                                                Enabled="True" TargetControlID="rfvCollegeCity">
                                            </asp:ValidatorCalloutExtender>
                                        </fieldset>
                                    </asp:Panel>
                                    <asp:DataList ID="GridColleges" runat="server">
                                        <ItemTemplate>
                                            <div style="width: 300px">
                                                <span style="font-weight: bold; font-size: 13px;">
                                                    <%# DataBinder.Eval(Container.DataItem, "InstitutionName")%></span>
                                                <br />
                                                <span style="font-size: 11px;">
                                                    <%# DataBinder.Eval(Container.DataItem, "City")%>
                                                </span>
                                                <asp:ImageButton ID="imgDeleteCollege" Style="float: right;" pid='<%# DataBinder.Eval(Container.DataItem, "ProfileEduID")%>'
                                                    ImageUrl="~/images/Close-icon.png" runat="server" OnClick="imgDeleteCollege_Click" />
                                                <hr />
                                            </div>
                                        </ItemTemplate>
                                    </asp:DataList>
                                    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalPopup"
                                        TargetControlID="lnkAddCollege" PopupControlID="pnlAddCollege" />
                                    <asp:LinkButton ID="lnkAddCollege" runat="server">Add College/Institution</asp:LinkButton>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="btnAddCollege" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>
                            <asp:UpdateProgress ID="updateProgressCollege" runat="server" AssociatedUpdatePanelID="pnlUpdateCollege">
                                <ProgressTemplate>
                                    <div style="position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; background-color: #000000;
                                        filter: alpha(opacity=55); -moz-opacity: .55; opacity: .55; z-index: 50;" id="pagedimmer">
                                        &nbsp;</div>
                                    <div style="position: fixed; background-color: #888888; border: 1px solid #999999;
                                        z-index: 50; left: 50%; right: 50%; top: 50%; width: 25px;" id="msgbox">
                                        <div>
                                            <img src="ajax-loader.gif" alt="loading" />
                                        </div>
                                    </div>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                        <td style="width: 120px">
                            <asp:DropDownList ID="ddlEducationPrivacy" CssClass="ddlcls ui-widget-content ui-corner-all"
                                runat="server">
                                <asp:ListItem Value="1">Public</asp:ListItem>
                                <asp:ListItem Value="2">Friends</asp:ListItem>
                                <asp:ListItem Value="3">Private</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px">
                            &nbsp;
                        </td>
                        <td style="width: 320px">
                            &nbsp;
                        </td>
                        <td style="width: 120px">
                            <asp:Button ID="btnSave" runat="server" CssClass="btncls" Text="Save Changes" OnClick="btnSave_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="updateProgressMain" runat="server" AssociatedUpdatePanelID="pnlUpdate">
            <ProgressTemplate>
                <div style="position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; background-color: #000000;
                    filter: alpha(opacity=55); -moz-opacity: .55; opacity: .55; z-index: 50;" id="pagedimmer">
                    &nbsp;</div>
                <div style="position: fixed; background-color: #888888; border: 1px solid #999999;
                    z-index: 50; left: 50%; right: 50%; top: 50%; width: 25px;" id="msgbox">
                    <div>
                        <img src="ajax-loader.gif" alt="loading" />
                    </div>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    </fieldset>
</asp:Content>
